﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Timers;
using System.Threading.Tasks;

namespace KC.Business.Scheduler.ContinuousPlugins
{
	public abstract class ContinuousPluginBase : PluginBase
	{
		public Timer timer { get; set; }
		public int Interval { get; set; }

		public ContinuousPluginBase(DataRow dr, string connStr)
		{
		}

		public new void Init(DataRow dr, string ConnStr)
		{
			base.Init(dr, ConnStr);

			timer = new Timer();
			timer.Interval = Interval;
			timer.Elapsed += timer_Elapsed;
		}

		public abstract void timer_Elapsed(object sender, ElapsedEventArgs e);
	}
}
